package com.ctd.springframework.core.io;

import com.ctd.springframework.util.ResourceUtils;

/**
 * ResourceLoader
 * 定义资源加载器，主妥应用于根据给定的资源文件地址返 回对应的
 * Resource
 *
 * @author chentudong
 * @time 2019/3/24 22:34
 */
public interface ResourceLoader {
    /**
     * Pseudo URL prefix for loading from the class path: "classpath:".
     */
    String CLASSPATH_URL_PREFIX = ResourceUtils.CLASSPATH_URL_PREFIX;

    /**
     * getResource
     *
     * @param location location
     * @return Resource
     */
    Resource getResource(String location);

    /**
     * 获取ClassLoader
     *
     * @return ClassLoader
     */
    ClassLoader getClassLoader();
}
